import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui'
import VueRouter from 'vue-router'
import VueDragResize from 'vue-drag-resize'
import 'element-ui/lib/theme-chalk/index.css'
import router from './router'
import {postRequest} from "./utils/request"
import {postKeyValueRequest} from "./utils/request"
import {putRequest} from "./utils/request"
import {deleteRequest} from "./utils/request"
import {getRequest} from "./utils/request"
import db from "./utils/sessionStorage"
import * as common from "./utils/common"
import VueDraggableResizable from 'vue-draggable-resizable'
import 'vue-draggable-resizable/dist/VueDraggableResizable.css'

// import ElementPlus from "element-plus"
// import zhCn from "element-plus/es/locale/lang/zh-cn"
// import MagicEditor from "@tmagic/editor"
// import MagicForm from "@tmagic/form"

// import "element-plus/dist/index.css"
// import "@tmagic/editor/dist/style.css"
// import "@tmagic/form/dist/style.css"

Vue.component('vue-draggable-resizable', VueDraggableResizable)

Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(VueRouter)
// 引入echarts
// const echarts = require('echarts')
import echarts from 'echarts'
Vue.prototype.$echarts = echarts

import * as echarts5 from 'echarts5'
// import echarts from 'echarts'// 可能是安装的时候安装方式不同，采用和echarts同样的引入方法echarts5为undefined
Vue.prototype.$echarts5 = echarts5

Vue.prototype.db = db
Vue.prototype.common = common
Vue.prototype.postRequest = postRequest;
Vue.prototype.postKeyValueRequest = postKeyValueRequest;
Vue.prototype.putRequest = putRequest;
Vue.prototype.deleteRequest = deleteRequest;
Vue.prototype.getRequest = getRequest;
Vue.component('vue-drag-resize', VueDragResize);
new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
